import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'

Vue.use(Vuex)
export default new Vuex.Store({
  mutations: {
    save(state, product) {
      state.product = product;
    },
    remove(state) {
      state.product = {}
    }
  },
  state: {
    product: {}
  },
  strict: process.env.NODE_ENV !== 'production',
  plugins: [createPersistedState()]
})
